<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

</body>
<script>
    // Object.create(proto)   创建一个对象,并设置其原型属性指向

    // 等价于
    // Object._create = function (proto) {
    //     var p = new Object();
    //     Object.setPrototypeOf(p, proto);
    //     return p;
    // }

    var result = Object.create(Array.prototype)
    console.log(result);

    var result = Object.create(Promise.prototype)
    console.log(result);

    var result = Object.create({ a: 1, b: 2 })
    console.log(result);

    // 
    var result = Object.create(null);  // 不指定原型属性
    console.log(result);


</script>

</html>